<? /** @var $model User */ ?>
<? $form = $this->beginWidget("RegForm", array("model" => $model)); ?>
  <table>
    <caption style='padding-bottom:20px;text-align:left;font-size:14px;font-weight:bold;'><?=$title?></caption>
    <? if (!strcasecmp($model->scenario, "insert")) : ?>
      <tr>
        <td><?=$form->inputLabel("photo")?>:</td>
        <td>
          <div class='ui-state-default avatar' id='photo'>
            <img src='<?=$model->getAvatar()?>' alt='Фото' />
          </div>
          <?=$form->inputHidden("photo").$form->inputHidden("photo_type")?>
        </td>
        <td style='width:100%;text-align:center;'>
          <a href='<?=$this->app->request->baseUrl?>/user/avatars' id='avatar' style='margin-left:2px;'>Выбрать аватар</a>
        </td>
        <td id='accounts' style='vertical-align:top;'>
          <ul style='padding:0;margin:0;list-style-type:none;'>
            <li>
              <a href='#' id='vk-account'></a>
              <?=$form->inputHidden("vkontakte")?>
            </li>
          </ul>
        </td>
      </tr>
      <tr>
        <td><?=$form->inputLabel("name")?>:</td>
        <td style='width:100%;' colspan='3'><?=$form->inputText("name").$form->getError("name")?></td>
      </tr>
      <tr>
        <td><?=$form->inputLabel("login")?>:</td>
        <td style='width:100%;' colspan='3'><?=$form->inputText("login").$form->getError("login")?></td>
      </tr>
    <? endif ?>
    <tr>
      <td><?=$form->inputLabel("paswd")?>:</td>
      <td style='width:100%;' colspan='3'><?=$form->inputPassword("paswd").$form->getError("paswd")?></td>
    </tr>
    <tr>
      <td><?=$form->inputLabel("confirm")?>:</td>
      <td style='width:100%;' colspan='3'><?=$form->inputPassword("confirm").$form->getError("confirm")?></td>
    </tr>
    <? if (!strcasecmp($model->scenario, "insert")) : ?>
      <tr>
        <td><?=$form->inputLabel("email")?>:</td>
        <td style='width:100%;' colspan='3'><?=$form->inputText("email").$form->getError("email")?></td>
      </tr>
    <? endif ?>
  </table>
  <p style='margin-bottom:0;text-align:center;'>
    <input type='submit' id='submit' value='<?=$submit?>' />
  </p>
<? $this->endWidget(); ?>
